#!/usr/bin/python
# -*- coding: utf-8 -*-


name_list = ['Tom', 'Lily', 'Rose']
#index
print(name_list.index('Lily'))
#count
print(name_list.count('Rose'))
#len
print(len(name_list))

#判断
print('Tom' in name_list)
print('tom' in name_list)
print('Tom' not in name_list)
print('tom' not in name_list)

#新增
name_list.append('huahua')
print(name_list)

#extend
name_list.extend('add')
print(name_list)

#insert
name_list.insert(1, 'xiaoming')
print(name_list)

#删除
#删除列表
# del name_list
# print(name_list)

#删除指定数据
# del name_list[0]
# print(name_list)

#pop
# name_list.pop()
# # print(name_list)
# # print(name_list.pop(0))

# name_list.remove('d')
# print(name_list)

#
# name_list.clear()
# print(name_list)

#修改
# name_list[0] = 'aa'
# print(name_list)

# name_list.reverse()
# print(name_list)

name_list.sort()
print(name_list)






